package com.wolfpire.workflow.jpdl.decision;

import org.jbpm.api.jpdl.DecisionHandler;
import org.jbpm.api.model.OpenExecution;

/**
 * decision节点变量处理
 * @author linRJ
 *
 */
public class ContentEvaluation implements DecisionHandler {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8657566268296644412L;

	public String decide(OpenExecution execution) {
		String to_content = (String) execution.getVariable("to_content");
		String formTypeId = (String) execution.getVariable("formTypeId");
		
		//////105352 
		if("105352".equals(formTypeId)){
			if(to_content.equals("街道")){
				return "to 街道调查";
			}
			if(to_content.equals("社区")){
				return "to 社区调查";
			}
			if(to_content.equals("区")){
				return "to 区信访";
			}
			
			return "to 区信访";
		}else{///事件流程
			if(to_content.equals("街道")){
				return "to 街道人员处理";
			}
			if(to_content.equals("社区")){
				return "to 社区人员处理";
			}
			if(to_content.equals("区")){
				return "to 区级人员处理";
			}
			if(to_content.equals("市")){
				return "to 市级人员处理";
			}
			return "to 网格人员处理";
		}
		
	}

}
